{template header}

<script src="public/js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script>
//设为导航
function isappnav(appkey,appname){
	$.ajax({
		type:"POST",
		url:"index.php?app=system&ac=apps&ts=appnav",
		data:"&appkey="+appkey+"&appname="+appname,
		beforeSend:function(){},
		success:function(result){
			if(result == '1'){
				window.location.reload(true); 
			}
		}
	})
}

//取消导航
function unisappnav(appkey){
	$.ajax({
		type:"POST",
		url:"index.php?app=system&ac=apps&ts=unappnav",
		data:"&appkey="+appkey,
		beforeSend:function(){},
		success:function(result){
			if(result == '1'){
				window.location.reload(true); 
			}
		}
	})
}

</script>


<div class="midder">

<h2>APP管理</h2>

<div class="tabnav">
<ul>
<li class="select"><a href="index.php?app=system&ac=apps&ts=list">APP列表</a></li>
</ul>
</div>

<table width="100%" cellpadding="0" cellspacing="0">
<tr class="old">
<td width="150">APP名称</td>
<td>版本</td>
<td>介绍</td>
<td>作者</td>
<td>管理</td>
<td>操作</td>
</tr>
{loop $arrApp $keys $item}
<tr class="odd">
<td><img src="app/{$item[name]}/icon.png" title="{$item}" align="absmiddle" />
{$item[about][name]}({$item[name]})</td>
<td>{$item[about][version]}
</td>
<td>{$item[about][desc]}</td>
<td>{$item[about][author]}</td>
<td>
{if $item[about][isoption] == '1' && $item[about][isinstall]=='1'}<a href="index.php?app={$item[name]}&ac=admin&mg=options">[管理]</a>{/if} 
</td>
<td>
{if $item[about][isappnav] == '1' && $TS_SITE[appnav][$item[name]] == ''}<a href="javascript:void('0');" onclick="isappnav('{$item[name]}','{$item[about][name]}');">[导航]</a>{/if}

{if $item[about][isappnav] == '1' && $TS_SITE[appnav][$item[name]] != ''}<a href="javascript:void('0');" onclick="unisappnav('{$item[name]}');">[取消导航]</a>{/if}
</td>
</tr>
{/loop}
</table>

</div>

{template footer}